//
//  FWViewController.m
//  iOSToolkit
//
//  Created by Evan Xie on 9/17/14.
//  Copyright (c) 2014 Family Wings. All rights reserved.
//

#import "FWViewController.h"

@interface FWViewController ()

@end

@implementation FWViewController

/** Available before iOS 6.0. */
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
    }
    
    // For iPad, supports all interface orientations.
    return YES;
}

/** Available iOS 6.0 or later. */
- (BOOL)shouldAutorotate
{
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations
{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        return UIInterfaceOrientationMaskAllButUpsideDown;
    }
    
    // For iPad, supports all interface orientations.
    return UIInterfaceOrientationMaskAll;
}

@end
